<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>网站配置问题</title>
	<script src="http://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
	<link rel="stylesheet" href="http://hdcms.hd/public/hdjs/hdjs.css"/>
	<script type="text/javascript" src="http://hdcms.hd/public/hdjs/hdjs.min.js"></script>
	<link type="text/css" rel="stylesheet" href="http://hdcms.hd/app/Admin/View/common.css"/>
</head>
<body>

<div class="hd-menu-list">
    <ul>
        <li class="active">
            <a href="#">角色列表</a>
        </li>
        <li><a href="<?php echo U('create')?>">添加角色</a></li>
    </ul>
</div>

<table class="hd-table hd-table-list">
    <thead>
    <tr>
        <td class='hd-w100'>ID</td>
        <td>角色名称</td>
        <td>操作</td>
    </tr>
    </thead>
    <tbody>
    <?php foreach ($data as $field): ?>
        <tr>
            <td><?php echo $field['id']?></td>
            <td>
                <?php echo $field['name']?>
            </td>
            <td class="hd-w150">
                <a href="<?php echo U('edit',array('id'=>$field['id']))?>">修改</a> |
                <a href="javascript:del(<?php echo $field['id']?>)">删除</a>
                |
                <a href="<?php echo U('Access/index',array('role_id'=>$field['id']))?>">权限设置</a>
            </td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>
<script>
    //删除栏目使用
    function del(id) {
        if (confirm('确定删除吗？')) {
            location.href = "<?php echo U('del')?>&id=" + id;
        }
    }
</script>
</body>
</html>











